package com.tiancheng.onecode.trade.enums;

import com.tiancheng.onecode.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 订单业务渠道来源
 *
 * @author kellen
 * @date 2024/3/4
 */
@Getter
@AllArgsConstructor
public enum OrderSourceEnum implements BaseEnum<String> {

	HOTEL("1", "酒店"),
	FLIGHT("2", "机票"),
	TICKET("3", "门票"),
	RESTAURANT("4", "餐饮"),
	UNION_WELFARE("5", "工会福利"),
	ONE_CODE("6","一码通"),
	CONSOLIDATION("99", "合单"),
	OTHER("100", "其他"),
	;

	private String code;
	private String desc;

	public static String getDesc(String code) {
		OrderSourceEnum[] businessModeEnums = values();
		for (OrderSourceEnum statusEnum : businessModeEnums) {
			if (statusEnum.code().equals(code)) {
				return statusEnum.desc();
			}
		}
		return null;
	}

	public String code() {
		return this.code;
	}

	public String desc() {
		return this.desc;
	}
}
